package day021.homework.p11;

import day021.homework.p11.Car;

public class CarFactory {
    public Car createCar(String id){
        if("bmw".equals(id)){
            return new Bmw();
        }else if("benz".equals(id)){
            return new Benz();
        }
        return null;
    }
}
